//
//  CTVClipMenuItemLayer.h
//  Channltv
//
//  Created by Bruno Keymolen on 11/09/07.
//  Copyright 2007 channl.tv. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import <BackRow/BRAdornedMenuItemLayer.h>
//#import "CTVClip.h"

@interface CTVClipMenuItemLayer : BRRenderLayer <BRMenuItemLayer> {
//	CTVClip* m_clip;
	BRBitmapTexture* m_thumbTexture;
	float m_rowHeight;
	BRTextMenuItemLayer *m_titleLayer;
	BRImageLayer* m_thumbLeftLayer;
	BRImageLayer* m_rateLayer;
	BRImageLayer* m_onDiskLayer;	
	BRImageLayer* m_streamLayer;	
	BRImageLayer* m_watchPointLayer;	
	BRTextLayer *m_offsetTextLayer;
	
	BRQuadLayer* m_grayLayer;
	BRQuadLayer* m_backgroundLayer;

	BOOL m_clipOnDisk;
	BOOL m_clipStream;
	float m_rate;
	float m_watchPoint;
}

+(id)clipMenuItemWithScene:(BRRenderScene*)scene andThumbTexture:(BRBitmapTexture*)thumbTexture andRowHeight:(float)rowHeight andTitle:(NSString*)title andRate:(float)rate;
-(id)initWithScene:(BRRenderScene*)scene andThumbTexture:(BRBitmapTexture*)thumbTexture andRowHeight:(float)rowHeight andTitle:(NSString*)title andRate:(float)rate;
-(void)dealloc;
-(BRTextMenuItemLayer*)textItem;
-(void)setRowHeight:(float)rowHeight;
-(BRBitmapTexture*)thumbTexture;
-(BOOL)clipOnDisk;
-(BOOL)clipStream;
-(void)setClipOnDisk:(BOOL)flag;
-(void)setClipStream:(BOOL)flag;
-(float)rate;
-(void)setRate:(float)rate;
-(void)setWatchPoint:(float)min;
-(float)watchPoint;

- (void)renderLayer;



//Private
-(void)_layOut;



//Base Class : BRRenderLayer
-(void)setFrame:(NSRect)frame;
-(NSRect)frame;

//BRMenuItemLayer
- (void)highlight;
- (void)unHighlight;
- (void)scrollItemIfNecessary;
- (void)stopScrollingItem;
- (float)defaultRowHeight;
- (BOOL)canHighlight;
- (BOOL)usesFullSelectionLozengeFrame;

//NSObject
- (unsigned)retainCount;
- (id)retain;
- (id)autorelease;
- (oneway void)release;

//BKControl
//- (id)BKretain;
//- (id)BKautorelease;
//- (oneway void)BKrelease;


@end
